Unit BTemplatesUnit;

{$mode objfpc}{$H+}

Interface

ResourceString
  TEMPLATE_LPI =
    '<?xml version="1.0"?>%0:s' +
    '<CONFIG>%0:s' +
    '  <ProjectOptions>%0:s' +
    '    <Version Value="9"/>%0:s' +
    '    <General>%0:s' +
    '      <MainUnit Value="0"/>%0:s' +
    '      <ResourceType Value="res"/>%0:s' +
    '      <UseXPManifest Value="True"/>%0:s' +
    '      <Icon Value="0"/>%0:s' +
    '      <ActiveWindowIndexAtStart Value="0"/>%0:s' +
    '    </General>%0:s' +
    '    <i18n>%0:s' +
    '      <EnableI18N LFM="False"/>%0:s' +
    '    </i18n>%0:s' +
    '    <VersionInfo>%0:s' +
    '      <StringTable ProductVersion=""/>%0:s' +
    '    </VersionInfo>%0:s' +
    '    <BuildModes Count="1" Active="Default">%0:s' +
    '      <Item1 Name="Default" Default="True"/>%0:s' +
    '    </BuildModes>%0:s' +
    '    <PublishOptions>%0:s' +
    '      <Version Value="2"/>%0:s' +
    '      <IncludeFileFilter Value="*.(pas|pp|inc|lfm|lpr|lrs|lpi|lpk|sh|xml)"/>%0:s' +
    '      <ExcludeFileFilter Value="*.(bak|ppu|o|so);*~;backup"/>%0:s' +
    '    </PublishOptions>%0:s' +
    '    <RunParams>%0:s' +
    '      <local>%0:s' +
    '        <FormatVersion Value="1"/>%0:s' +
    '        <LaunchingApplication PathPlusParams=""/>%0:s' +
    '      </local>%0:s' +
    '    </RunParams>%0:s' +
    '    <RequiredPackages Count="2">%0:s' +
    '      <Item1>%0:s' +
    '        <PackageName Value="FPCUnitConsoleRunner"/>%0:s' +
    '      </Item1>%0:s' +
    '      <Item2>%0:s' +
    '        <PackageName Value="FCL"/>%0:s' +
    '      </Item2>%0:s' +
    '    </RequiredPackages>%0:s' +
    '    <Units Count="1">%0:s' +
    '      <Unit0>%0:s' +
    '        <Filename Value="%1:s"/>%0:s' +
    '        <IsPartOfProject Value="True"/>%0:s' +
    '        <UnitName Value="%2:s"/>%0:s' +
    '      </Unit0>%0:s' +
    '    </Units>%0:s' +
    '</ProjectOptions>%0:s' +
    '<CompilerOptions>%0:s' +
    '  <Version Value="9"/>%0:s' +
    '  <Target>%0:s' +
    '    <Filename Value="./%2:s"/>%0:s' +
    '  </Target>%0:s' +
    '  <Parsing>%0:s' +
    '    <SyntaxOptions>%0:s' +
    '      <CStyleMacros Value="True"/>%0:s' +
    '    </SyntaxOptions>%0:s' +
    '  </Parsing>%0:s' +
    '  <SearchPaths>%0:s' +
    '    <IncludeFiles Value="$(ProjOutDir)"/>%0:s' +
    '    <UnitOutputDirectory Value="lib-tests/$(TargetCPU)-$(TargetOS)"/>%0:s' +
    '    <OtherUnitFiles Value="Mocks;TestCases;%3:s"/>%0:s' +
    '  </SearchPaths>%0:s' +
    '  <Other>%0:s' +
    '    <CompilerMessages>%0:s' +
    '      <UseMsgFile Value="True"/>%0:s' +
    '    </CompilerMessages>%0:s' +
    '    <CustomOptions Value="-dTestCase -gttt %4:s" />%0:s' +
    '    <CompilerPath Value="$(CompPath)"/>%0:s' +
    '  </Other>%0:s' +
    '</CompilerOptions>%0:s' +
    '<Debugging>%0:s' +
    '  <Exceptions Count="3">%0:s' +
    '    <Item1>%0:s' +
    '      <Name Value="EAbort"/>%0:s' +
    '    </Item1>%0:s' +
    '    <Item2>%0:s' +
    '      <Name Value="ECodetoolError"/>%0:s' +
    '    </Item2>%0:s' +
    '    <Item3>%0:s' +
    '      <Name Value="EFOpenError"/>%0:s' +
    '    </Item3>%0:s' +
    '  </Exceptions>%0:s' +
    '</Debugging>%0:s' +
    '</CONFIG>';

  TEMPLATE_LPR =
    'Program %1:s;%0:s' +
    '%0:s'   +
    '{$mode objfpc}{$H+}%0:s' +
    '%0:s'   +
    'Uses %0:s' +
    '  {$IFDEF unix}%0:s' +
    '  cthreads,%0:s' +
    '  {$ENDIF}%0:s' +
    '  %2:sClasses, consoletestrunner, BEasyLog;%0:s' +
    '%0:s'   +
    'Var%0:s' +
    '  Application: TTestRunner;%0:s' +
    '' +
    '{$R *.res}%0:s' +
    '%0:s'   +
    'Begin%0:s' +
    '  InitLogging;%0:s' +
    '  Application := TTestRunner.Create(nil);%0:s' +
    '  Application.Initialize;%0:s' +
    '  Application.Run;%0:s' +
    '  Application.Free;%0:s' +
    'End.';



Implementation

End.

